package com.boxuegu.websecurity.bbs.service.impl;

import com.boxuegu.websecurity.bbs.domain.Message;
import com.boxuegu.websecurity.bbs.mapper.MessageMapper;
import com.boxuegu.websecurity.bbs.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 留言服务实现类
 *
 * @author Jam Fang  https://www.jianshu.com/u/0977ede560d4
 * @version 创建时间：2019.10.9 14:59
 */
@Service
public class MessageServiceImpl implements MessageService {
    @Autowired
    private MessageMapper messageMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return messageMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Message message) {
        return messageMapper.insert(message);
    }

    @Override
    public List<Message> getMessageList() {
        return messageMapper.getMessageList();
    }
}
